﻿#define _CRT_SECURE_NO_WARNINGS
#include"game.h"
menu()
{
	printf("*****************************\n");
	printf("*******     1.play   ********\n");
	printf("*******     0.exit   ********\n");
	printf("*****************************\n");

}
void game()
{
	char mine_board[ROWS][COLS];
	char show_board[ROWS][COLS];

	put(mine_board, ROWS, COLS, '0');
	put(show_board, ROWS, COLS, '*');
	lei(mine_board, ROW, COL);
	system("cls");
	//print(mine_board, ROW, COL);
	print(show_board, ROW, COL);
	find(mine_board, show_board, ROW, COL);

}
int main()
{
	srand((unsigned int)time(NULL));
	int n = 0;
	do
	{
		menu();
		printf("请选择:>");
		scanf("%d", &n);
		switch (n)
		{
		case 1:
			game();
			break;
		case 0:
			break;
		default:
			printf("输入错误，请重新选择！\n");
			break;
		}

	} while (n);
	return 0;
}